/**
 * Copyright (C) 2025 ROKAE (Beijing) Technology Co., LTD.
 * All Rights Reserved.
 *
 * Information in this file is the intellectual property of Rokae Technology Co., Ltd,
 * And may contains trade secrets that must be stored and viewed confidentially.
 *
 * @file RLSetForceWidget.cpp
 * @brief RL Set Force 指令
 */
#include "RLSetForceWidget.h"
#include "ui_RLSetForceWidget.h"

xplugin::RLSetForceWidget::RLSetForceWidget(const QString &type, QWidget *parent)
    : RLContentBase(parent)
    , ui(new Ui::RLSetForceWidget)
{
    ui->setupUi(this);
    setType(type);
}

xplugin::RLSetForceWidget::~RLSetForceWidget()
{
    delete ui;
}

void xplugin::RLSetForceWidget::FillWith(const QString &str)
{
    qDebug() << "xplugin::RLSetForceWidget::FillWith : " << m_type << " : " << str;
}

QString xplugin::RLSetForceWidget::ToString()
{
    QString lab1 = QString::number(ui->spinBox_ID->value());
    QString lab2 = QString::number(ui->spinBox_little->value());
    QString lab3 = QString::number(ui->spinBox_ring->value());
    QString lab4 = QString::number(ui->spinBox_middle->value());
    QString lab5 = QString::number(ui->spinBox_index->value());
    QString lab6 = QString::number(ui->spinBox_thumbBend->value());
    QString lab7 = QString::number(ui->spinBox_thumbRotation->value());
    return m_type + QString(" %1,%2,%3,%4,%5,%6,%7").arg(lab1).arg(lab2).arg(lab3).arg(lab4).arg(lab5).arg(lab6).arg(lab7);
}

bool xplugin::RLSetForceWidget::CheckInsert()
{
    return true;
}

